Optimal. Leaf size=277 \[ -\frac {i \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{\sqrt {2} \sqrt {a} (c-i d)^{5/2} f}-\frac {1}{(i c-d) f \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}+\frac {d (3 i c+5 d) \sqrt {a+i a \tan (e+f x)}}{3 a (i c-d) \left (c^2+d^2\right ) f (c+d \tan (e+f x))^{3/2}}+\frac {(3 c-i d) (c-7 i d) d \sqrt {a+i a \tan (e+f x)}}{3 a (c-i d)^2 (c+i d)^3 f \sqrt {c+d \tan (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.59, antiderivative size = 277, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {3640, 3679, 12,
3625, 214} \begin {gather*} \frac {d (5 d+3 i c) \sqrt {a+i a \tan (e+f x)}}{3 a f (-d+i c) \left (c^2+d^2\right ) (c+d \tan (e+f x))^{3/2}}+\frac {d (3 c-i d) (c-7 i d) \sqrt {a+i a \tan (e+f x)}}{3 a f (c-i d)^2 (c+i d)^3 \sqrt {c+d \tan (e+f x)}}-\frac {1}{f (-d+i c) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}-\frac {i \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{\sqrt {2} \sqrt {a} f (c-i d)^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 214
Rule 3625
Rule 3640
Rule 3679
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{5/2}} \, dx &=-\frac {1}{(i c-d) f \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}-\frac {\int \frac {\sqrt {a+i a \tan (e+f x)} \left (-\frac {1}{2} a (i c-5 d)-2 i a d \tan (e+f x)\right )}{(c+d \tan (e+f x))^{5/2}} \, dx}{a^2 (i c-d)}\\ &=-\frac {1}{(i c-d) f \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}+\frac {(3 c-5 i d) d \sqrt {a+i a \tan (e+f x)}}{3 a (c-i d) (c+i d)^2 f (c+d \tan (e+f x))^{3/2}}-\frac {2 \int \frac {\sqrt {a+i a \tan (e+f x)} \left (\frac {1}{4} a^2 \left (12 c d-i \left (3 c^2+7 d^2\right )\right )-\frac {1}{2} a^2 d (3 i c+5 d) \tan (e+f x)\right )}{(c+d \tan (e+f x))^{3/2}} \, dx}{3 a^3 (i c-d) \left (c^2+d^2\right )}\\ &=-\frac {1}{(i c-d) f \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}+\frac {(3 c-5 i d) d \sqrt {a+i a \tan (e+f x)}}{3 a (c-i d) (c+i d)^2 f (c+d \tan (e+f x))^{3/2}}+\frac {(3 c-i d) (c-7 i d) d \sqrt {a+i a \tan (e+f x)}}{3 a (c-i d)^2 (c+i d)^3 f \sqrt {c+d \tan (e+f x)}}+\frac {4 \int \frac {3 a^3 (i c-d)^3 \sqrt {a+i a \tan (e+f x)}}{8 \sqrt {c+d \tan (e+f x)}} \, dx}{3 a^4 (i c-d)^3 (c-i d)^2}\\ &=-\frac {1}{(i c-d) f \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}+\frac {(3 c-5 i d) d \sqrt {a+i a \tan (e+f x)}}{3 a (c-i d) (c+i d)^2 f (c+d \tan (e+f x))^{3/2}}+\frac {(3 c-i d) (c-7 i d) d \sqrt {a+i a \tan (e+f x)}}{3 a (c-i d)^2 (c+i d)^3 f \sqrt {c+d \tan (e+f x)}}+\frac {\int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx}{2 a (c-i d)^2}\\ &=-\frac {1}{(i c-d) f \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}+\frac {(3 c-5 i d) d \sqrt {a+i a \tan (e+f x)}}{3 a (c-i d) (c+i d)^2 f (c+d \tan (e+f x))^{3/2}}+\frac {(3 c-i d) (c-7 i d) d \sqrt {a+i a \tan (e+f x)}}{3 a (c-i d)^2 (c+i d)^3 f \sqrt {c+d \tan (e+f x)}}-\frac {(i a) \text {Subst}\left (\int \frac {1}{a c-i a d-2 a^2 x^2} \, dx,x,\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {a+i a \tan (e+f x)}}\right )}{(c-i d)^2 f}\\ &=-\frac {i \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{\sqrt {2} \sqrt {a} (c-i d)^{5/2} f}-\frac {1}{(i c-d) f \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}+\frac {(3 c-5 i d) d \sqrt {a+i a \tan (e+f x)}}{3 a (c-i d) (c+i d)^2 f (c+d \tan (e+f x))^{3/2}}+\frac {(3 c-i d) (c-7 i d) d \sqrt {a+i a \tan (e+f x)}}{3 a (c-i d)^2 (c+i d)^3 f \sqrt {c+d \tan (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(687\) vs. \(2(277)=554\).
time = 8.97, size = 687, normalized size = 2.48 \begin {gather*} -\frac {i e^{i e} \sqrt {e^{i f x}} \log \left (2 \left (\sqrt {c-i d} e^{i (e+f x)}+\sqrt {1+e^{2 i (e+f x)}} \sqrt {c-\frac {i d \left (-1+e^{2 i (e+f x)}\right )}{1+e^{2 i (e+f x)}}}\right )\right ) \sqrt {\sec (e+f x)} \sqrt {\cos (f x)+i \sin (f x)}}{\sqrt {2} (c-i d)^{5/2} \sqrt {\frac {e^{i (e+f x)}}{1+e^{2 i (e+f x)}}} \sqrt {1+e^{2 i (e+f x)}} f \sqrt {a+i a \tan (e+f x)}}+\frac {\sec (e+f x) (\cos (f x)+i \sin (f x)) \sqrt {\sec (e+f x) (c \cos (e+f x)+d \sin (e+f x))} \left (\frac {\cos (2 f x) \left (\frac {1}{2} i \cos (e)+\frac {\sin (e)}{2}\right )}{(c+i d)^3}+\frac {\left (\frac {\cos (e)}{6}+\frac {1}{6} i \sin (e)\right ) \left (3 i c^3 \cos (e)+6 c^2 d \cos (e)-39 i c d^2 \cos (e)-8 d^3 \cos (e)+3 i c^2 d \sin (e)+6 c d^2 \sin (e)+i d^3 \sin (e)\right )}{(c-i d)^2 (c+i d)^3 (c \cos (e)+d \sin (e))}+\frac {\left (\frac {\cos (e)}{2}-\frac {1}{2} i \sin (e)\right ) \sin (2 f x)}{(c+i d)^3}+\frac {-\frac {2}{3} i d^4 \cos (e)+\frac {2}{3} d^4 \sin (e)}{(c-i d)^2 (c+i d)^3 (c \cos (e+f x)+d \sin (e+f x))^2}+\frac {4 \left (-\frac {5}{2} c d^3 \cos (e-f x)+\frac {1}{2} i d^4 \cos (e-f x)+\frac {5}{2} c d^3 \cos (e+f x)-\frac {1}{2} i d^4 \cos (e+f x)-\frac {5}{2} i c d^3 \sin (e-f x)-\frac {1}{2} d^4 \sin (e-f x)+\frac {5}{2} i c d^3 \sin (e+f x)+\frac {1}{2} d^4 \sin (e+f x)\right )}{3 (c-i d)^2 (c+i d)^3 (c \cos (e)+d \sin (e)) (c \cos (e+f x)+d \sin (e+f x))}\right )}{f \sqrt {a+i a \tan (e+f x)}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 4888 vs. \(2 (231 ) = 462\).
time = 0.71, size = 4889, normalized size = 17.65
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(4889\) |
default | \(\text {Expression too large to display}\) | \(4889\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 1325 vs. \(2 (225) = 450\).
time = 1.39, size = 1325, normalized size = 4.78 \begin {gather*} \frac {2 \, \sqrt {2} {\left (3 \, c^{4} + 6 \, c^{2} d^{2} + 3 \, d^{4} + {\left (3 \, c^{4} - 12 i \, c^{3} d - 54 \, c^{2} d^{2} + 52 i \, c d^{3} + 7 \, d^{4}\right )} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (9 \, c^{4} - 24 i \, c^{3} d - 90 \, c^{2} d^{2} + 16 i \, c d^{3} - 11 \, d^{4}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, {\left (3 \, c^{4} - 4 i \, c^{3} d - 10 \, c^{2} d^{2} - 12 i \, c d^{3} - 5 \, d^{4}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} + 3 \, {\left ({\left (-i \, a c^{7} - a c^{6} d - 3 i \, a c^{5} d^{2} - 3 \, a c^{4} d^{3} - 3 i \, a c^{3} d^{4} - 3 \, a c^{2} d^{5} - i \, a c d^{6} - a d^{7}\right )} f e^{\left (5 i \, f x + 5 i \, e\right )} + 2 \, {\left (-i \, a c^{7} + a c^{6} d - 3 i \, a c^{5} d^{2} + 3 \, a c^{4} d^{3} - 3 i \, a c^{3} d^{4} + 3 \, a c^{2} d^{5} - i \, a c d^{6} + a d^{7}\right )} f e^{\left (3 i \, f x + 3 i \, e\right )} + {\left (-i \, a c^{7} + 3 \, a c^{6} d + i \, a c^{5} d^{2} + 5 \, a c^{4} d^{3} + 5 i \, a c^{3} d^{4} + a c^{2} d^{5} + 3 i \, a c d^{6} - a d^{7}\right )} f e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {-\frac {2 i}{{\left (i \, a c^{5} + 5 \, a c^{4} d - 10 i \, a c^{3} d^{2} - 10 \, a c^{2} d^{3} + 5 i \, a c d^{4} + a d^{5}\right )} f^{2}}} \log \left ({\left (i \, a c^{3} + 3 \, a c^{2} d - 3 i \, a c d^{2} - a d^{3}\right )} f \sqrt {-\frac {2 i}{{\left (i \, a c^{5} + 5 \, a c^{4} d - 10 i \, a c^{3} d^{2} - 10 \, a c^{2} d^{3} + 5 i \, a c d^{4} + a d^{5}\right )} f^{2}}} e^{\left (i \, f x + i \, e\right )} + \sqrt {2} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} {\left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}\right ) + 3 \, {\left ({\left (i \, a c^{7} + a c^{6} d + 3 i \, a c^{5} d^{2} + 3 \, a c^{4} d^{3} + 3 i \, a c^{3} d^{4} + 3 \, a c^{2} d^{5} + i \, a c d^{6} + a d^{7}\right )} f e^{\left (5 i \, f x + 5 i \, e\right )} + 2 \, {\left (i \, a c^{7} - a c^{6} d + 3 i \, a c^{5} d^{2} - 3 \, a c^{4} d^{3} + 3 i \, a c^{3} d^{4} - 3 \, a c^{2} d^{5} + i \, a c d^{6} - a d^{7}\right )} f e^{\left (3 i \, f x + 3 i \, e\right )} + {\left (i \, a c^{7} - 3 \, a c^{6} d - i \, a c^{5} d^{2} - 5 \, a c^{4} d^{3} - 5 i \, a c^{3} d^{4} - a c^{2} d^{5} - 3 i \, a c d^{6} + a d^{7}\right )} f e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {-\frac {2 i}{{\left (i \, a c^{5} + 5 \, a c^{4} d - 10 i \, a c^{3} d^{2} - 10 \, a c^{2} d^{3} + 5 i \, a c d^{4} + a d^{5}\right )} f^{2}}} \log \left ({\left (-i \, a c^{3} - 3 \, a c^{2} d + 3 i \, a c d^{2} + a d^{3}\right )} f \sqrt {-\frac {2 i}{{\left (i \, a c^{5} + 5 \, a c^{4} d - 10 i \, a c^{3} d^{2} - 10 \, a c^{2} d^{3} + 5 i \, a c d^{4} + a d^{5}\right )} f^{2}}} e^{\left (i \, f x + i \, e\right )} + \sqrt {2} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} {\left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}\right )}{12 \, {\left ({\left (-i \, a c^{7} - a c^{6} d - 3 i \, a c^{5} d^{2} - 3 \, a c^{4} d^{3} - 3 i \, a c^{3} d^{4} - 3 \, a c^{2} d^{5} - i \, a c d^{6} - a d^{7}\right )} f e^{\left (5 i \, f x + 5 i \, e\right )} + 2 \, {\left (-i \, a c^{7} + a c^{6} d - 3 i \, a c^{5} d^{2} + 3 \, a c^{4} d^{3} - 3 i \, a c^{3} d^{4} + 3 \, a c^{2} d^{5} - i \, a c d^{6} + a d^{7}\right )} f e^{\left (3 i \, f x + 3 i \, e\right )} + {\left (-i \, a c^{7} + 3 \, a c^{6} d + i \, a c^{5} d^{2} + 5 \, a c^{4} d^{3} + 5 i \, a c^{3} d^{4} + a c^{2} d^{5} + 3 i \, a c d^{6} - a d^{7}\right )} f e^{\left (i \, f x + i \, e\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {i a \left (\tan {\left (e + f x \right )} - i\right )} \left (c + d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {1}{\sqrt {a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}\,{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________